package edu.osu.intelligentagents.assignment2;

import edu.osu.intelligentagents.common.MDP;
import edu.osu.intelligentagents.common.State;
import edu.osu.intelligentagents.common.StationaryPolicy;

public class Assignment2_SimpleMDP {
	private static boolean debug = false;

	public static void runSimpleExample(String[] args) {
		MDP mdp = new MDP(args[0]);
		float f = 0.1f;
		for (; f < 1;) {
			System.out.println("F:" + f);
			StationaryPolicy policy = new StationaryPolicy(f);
			policy.setMDP(mdp);
			policy.valueIteration(Float.valueOf(0.000001f));
			for (State state : mdp.states) {
				System.out.println(state + "&" + policy.getAction(state) + "&"
						+ state.getValues().get(0) + "\\\\\\hline");
			}
			f += 0.1f;
		}

	}

	public static void main(String[] args) {
		runSimpleExample(args);
	}
}
